/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.liskovsubstitution.account.impl;

import za.ac.cput.assignment2.liskovsubstitution.account.AccountInterface;

/**
 *
 * @author yandiswa
 */
public class AccountImpl implements AccountInterface

{
    private int balance;
    private int period;
    public AccountImpl()
    {
        
    }

    /**
     * @return the balance
     */
    public int getBalance() {
        return balance;
    }

    /**
     * @param balance the balance to set
     */
    public void setBalance(int balance) {
        this.balance = balance;
    }

    /**
     * @return the period
     */
    public int getPeriod() {
        return period;
    }

    /**
     * @param period the period to set
     */
    public void setPeriod(int period) {
        this.period = period;
    }

   
@Override
    public boolean openAcc(int acc) {
        setBalance(acc);
        return true;
    }
    @Override
    public boolean closeAcc(boolean acc) {
       if (getBalance() >0)
            return true;
        else
            return false; 
       
    }

    

}
